// 用户状态
import { setStorage,getStorage } from "@/utils/storage";
export default {
  namespaced: true,
  state: () => {
    return {
      // 用户信息
      profile: {
        id: "",
        avatar:"",
          // "http://zhoushugang.gitee.io/erabbit-client-pc-static/uploads/clothes_goods_4.jpg",
        nickname: "",
        account: "",
        mobile: "",
        token:"",
          // "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ7XCJuYW1lXCI6XCLlkajmsI_niIbogprppoZcIixcImlkXCI6XCIxMzQ1OTE3MTYyMTMyMzQ0ODM0XCIsXCJ1c2VybmFtZVwiOlwiemhvdXNnXCJ9IiwiaWF0IjoxNjU1MTY5NzczLCJleHAiOjE2NTU0Mjg5NzN9.1AvRFHZW97B1RkZoZz3-sErztUVFzg-q1LqZfDEXTdg",
      },
    };
  },

  mutations: {
    setUser (state, payload) {
      (state.profile = payload)
      setStorage("profile", state.profile);
    }
  }
}
